package com.circle.interests.biz.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.circle.interests.biz.entity.PrizeInfo;
import com.circle.interests.biz.request.PrizeInfoPageRequest;
import com.circle.interests.biz.request.PrizeInfoRequest;

import java.util.List;

/**
 * <p>
 * 奖品信息 服务类
 * </p>
 *
 * @author generator
 * @since 2021-12-05
 */
public interface IPrizeInfoService extends IService<PrizeInfo> {

    IPage<PrizeInfo> page(PrizeInfoPageRequest form);

    PrizeInfo add(PrizeInfoRequest form);

    List<PrizeInfo> list(Long categoryId);

    void updateById(PrizeInfoRequest form);

    void deleteById(Long id);

    PrizeInfo getByCode(String code);

    Boolean increment(PrizeInfo prizeInfo, Integer count);

    Boolean decrement(PrizeInfo prizeInfo, Integer count);

    Boolean hasPrize(Long categoryId);

    Boolean modifyInventory(Long prizeId, Integer count);
}
